//
//  ThreeBlockBoxStyle1View.m
//  Menu
//
//  Created by trimad on 11-11-11.
//  Copyright 2011 Trimad Group. All rights reserved.
//

#import "ThreeBlockBoxStyle1View.h"
#import "LayoutItemView.h"

@implementation ThreeBlockBoxStyle1View


- (id)initWithFrameAndItems:(CGRect)frame items:(NSArray *) items {
	self = [super initWithFrameAndItems:frame items:items];
	
    if (self) {
		int count = [items count];
		int x, y;
		x = 10;
		LayoutItemView *layoutItemView;
		
		for (int i = 0; i < count; i++) {
			y = 0 + i * 280;
			layoutItemView = [[[NSBundle mainBundle] loadNibNamed:@"LeftThreeBlockBoxItemView" owner:self options:nil] 
							  objectAtIndex:0];
			layoutItemView.frame = CGRectMake(x, y, 660, 270);
			[layoutItemView activate:[items objectAtIndex:i]];
			[self addSubview: layoutItemView];
		}
	}
	return self;
}

@end
